home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gwuada_0.zip / userman.dos < prev   
Text File  |  1994-06-21  |  32KB  |  738 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.               GWAda Program Development Environment
  8.               -------------------------------------
  9.                       User Manual 
  10.                       January 1994
  11.                         
  12.                 Prof. Michael B. Feldman 
  13.            Department of Electrical Engineering and Computer Science 
  14.           The George Washington University Washington, DC 20052
  15.                  (202) 994-5253 (voice) 
  16.                   (202) 994-5296 (fax) 
  17.                 mfeldman@seas.gwu.edu (Internet)
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.      
  31.      This project was sponsored by The George Washington University, and in
  32.      part by the United States Advanced Research Projects Agency (ARPA) 
  33.      under contract #FY3592-93-10234, administered by Phillips Laboratory, 
  34.      Kirtland AFB, NM 87117-5776.
  35.      
  36.      
  37.      Copyright (C) 1993, 
  38.      Charles W. Kann, Arthur Vargas Lopes, and Michael Bliss Feldman
  39.      
  40.      
  41.      This program is free software; you can redistribute it and/or modify
  42.      it under the terms of the GNU General Public License as published by
  43.      the Free Software Foundation; either version 2 of the License.
  44.      
  45.      This program is distributed in the hope that it will be useful,
  46.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  47.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  48.      GNU General Public License for more details.
  49.      
  50.      You should have received a copy of the GNU General Public License
  51.      along with this program; if not, write to the Free Software
  52.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  53.      
  54.  
  55.      GWAda User Manual                January 1994                     page 1
  56.  
  57.  
  58.      I. ABOUT THE GWAda DEVELOPMENT ENVIRONMENT
  59.      
  60.      GWAda is a development environment built around the NYU AdaEd
  61.      compiler/interpreter. It allows the  editing,  compiling,  binding  and
  62.      execution of Ada 83 programs.
  63.      
  64.      GWAda was supervised by Prof. Michael B. Feldman. Dr. Arthur V. Lopes
  65.      wrote the editor and associated tools; Charles A. Kann, a GWU doctoral
  66.      student in Computer Science, is responsible for the run-time monitoring
  67.      capabilities.
  68.  
  69.      GWAda User Manual                January 1994                     page 2
  70.  
  71.  
  72.      II. INSTALLATION
  73.      
  74.      When you un-archive the files (see the instructions below), you will
  75.      find a user manual, userman.doc, describing the GW development
  76.      environment, and a file readme.nyu file with documentation on the NYU
  77.      part of the system. Note that you do not have to use the GWAda
  78.      integrated environment, but can execute the various parts of NYU Ada/Ed
  79.      from the DOS command line, as described in the NYU instructions.
  80.      
  81.      
  82.      System Requirements
  83.      -------------------
  84.      
  85.      IBM PC Compatible, 386 or 486, running MS-DOS or PC-DOS
  86.      at least 3.6 mb available extended memory
  87.      at least 5   mb free hard disk space
  88.      
  89.      
  90.      Installing GWAda
  91.      ----------------
  92.      
  93.      Assuming that:
  94.      
  95.      first diskette is in drive B:
  96.      the target hard disk is C:
  97.      
  98.      1 - The installation process will create a directory named ADAED 
  99.      to store everything, so first position to the desired hard disk.
  100.      
  101.        cd C:\
  102.        
  103.      2 - Copy unzip.exe from the diskette to the hard drive
  104.      
  105.        copy b:\unzip.exe .
  106.      
  107.      3 - Unzip the first archive
  108.      
  109.        unzip b:\support.zip
  110.      
  111.        then change to the adaed directory, replace the first diskette with 
  112.        the second, and type
  113.      
  114.        c:\unzip b:\binaries.zip
  115.      
  116.      4 - Create a working directory for your Ada programs:
  117.      
  118.        mkdir c:\adaed\myprogs
  119.      
  120.      5 - Add c:\adaed to your DOS path, for example
  121.      
  122.        path=c:\adaed;c:\;c:\dos
  123.  
  124.  
  125.      GWAda User Manual                January 1994                     page 3
  126.  
  127.      
  128.      6 - create the adaed environment variable:
  129.      
  130.        set adaed=c:\adaed
  131.      
  132.        You might wish to add steps (4) and (5) to your autoexec.bat file, or
  133.        create a separate setup.bat just to run when you need to use GWAda.
  134.      
  135.      7 - Change to your working directory
  136.      
  137.        cd c:\adaed\myprogs
  138.    
  139.  
  140.      GWAda User Manual                January 1994                     page 4
  141.  
  142.  
  143.      III. USING GWAda
  144.      
  145.      This section gives a tutorial on using GWAda.
  146.      
  147.      
  148.      A First Compilation and Execution using GWAda and Runtime Monitoring
  149.      -------------------------------------------------------------------
  150.      
  151.       1 - Copy the Ada demonstration programs from the directory
  152.       \ADAED\GWUDEMOS to your working directory
  153.      
  154.        copy \adaed\gwudemos\*.* .
  155.      
  156.       2 - Start GWAda by typing "GWAda FIRST.ADA"
  157.      
  158.       3 - The GWAda editor should now be running, with the source for
  159.       the program FIRST.ADA in the window.  First, create a new
  160.       library as follows:
  161.      
  162.       Press the ESC key to put the menu bar at the top of the screen.
  163.       Type O to select the options menu.
  164.       Type N to select a new library.
  165.      
  166.       A New library has been created.
  167.      
  168.       4 - You should still be on the menu bar. Type C to select compile, then
  169.       C again to indicate that the file in the current window is to be
  170.       compiled.
  171.      
  172.       5 - When the compilation is done, you will no longer have the menu bar.  
  173.       Press the ESC key to bring up the menu bar, and type B to bind 
  174.       (link) the program.
  175.      
  176.       6 - You will be asked for the program to bind.  Select "first" by 
  177.       pressing ENTER. The program is now bound (linked).
  178.      
  179.       7 - Type R to run the program.  When asked which program to run, select 
  180.       "first".
  181.      
  182.       8 - You should now have up the monitor screen.
  183.      
  184.       9 - Press ESC to take the default options on the first screen 
  185.       (speed = 6, exceptions = yes, and tasks = no). Press ESC again to 
  186.       take the defaults on the second screen (Small window, line 
  187.       tracing, and no procedure tracing). 
  188.      
  189.      10 - Now the monitor should be running, stopped at the elaboration of 
  190.       the variable Name.  Press the space bar until the program asks for 
  191.       your name, then once more so that it will reach the Get_Line
  192.       statement.  Type in your name, then press return.  Continue to 
  193.       press the space bar until the program completes execution.
  194.  
  195.      GWAda User Manual                January 1994                     page 5
  196.  
  197.  
  198.      Compiling a Program That Isn't in the Current Window
  199.      ----------------------------------------------------
  200.      
  201.      To use the rest of the demo programs, you will need to compile some 
  202.      input/output instances. These are in the file IO_LIBS.ADA. Press ESC
  203.      to reveal the menu bar, then C to request compilation, then select 
  204.      "select unit" to select a file from the working directory. You will get 
  205.      a window showing the directory followed by *.ADA. Press ENTER; you will
  206.      then see a window showing all the files with file type .ADA. Use the
  207.      down-arrow key to select IO_LIBS.ADA; this file will then be compiled. 
  208.      
  209.      
  210.      Using the GWAda Runtime Monitor to Trace Subprogram Calls
  211.      ---------------------------------------------------------
  212.      
  213.      To demonstrate subprogram tracing we use the program FIBB.ADA. This 
  214.      program calculates a Fibonacci number by summing the two previous 
  215.      Fibonacci numbers. The Fibonacci series is
  216.      
  217.      1 1 2 3 5 8 13 21 ...
  218.      
  219.      It was developed originally to model the growth of a colony of rabbits.
  220.      The Fibonacci function is recursive, so running the program will lead
  221.      to a large number of nested recursive calls. Compile this program,
  222.      then bind it as before.
  223.      
  224.      To see the execution tracting, take the default options on the first 
  225.      Run screen (speed = 6, exceptions = yes, and tasks = no)
  226.      Change from a Small Window to a Large Window on the second screen.
  227.      
  228.      The purpose of this program is to show a large amount of recursion.
  229.      Therefore, when prompted for the number to be calculated, choose 7.
  230.      This will cause Fib_Calc to be called recursively many times..
  231.      
  232.      Notice that each time Fib_Calc is called, a new window is opened until
  233.      the screen is filled with windows.  At that point, no new windows are
  234.      created, but notice that the highest level window "Scrolls" off to the
  235.      upper right and is no longer visible.
  236.